using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._LayersandTableViews
{
    /// <summary>
    /// <para>Apply Symbology From Layer</para>
    /// <para>Applies the symbology from a specified layer or layer file to the input. It can be applied to feature, raster, network analysis, TIN, and geostatistical layers.</para>
    /// <para>将指定图层或图层文件中的符号系统应用于输入。它可应用于要素、栅格、网络分析、TIN 和地统计图层。</para>
    /// </summary>    
    [DisplayName("Apply Symbology From Layer")]
    public class ApplySymbologyFromLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ApplySymbologyFromLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_layer">
        /// <para>Input Layer</para>
        /// <para>The layer to which the symbology will be applied.</para>
        /// <para>将应用符号系统的图层。</para>
        /// </param>
        /// <param name="_in_symbology_layer">
        /// <para>Symbology Layer</para>
        /// <para>The symbology of this layer will be applied to the input layer. Both .lyrx and .lyr files are supported.</para>
        /// <para>此图层的符号系统将应用于输入图层。支持 .lyrx 和 .lyr 文件。</para>
        /// </param>
        public ApplySymbologyFromLayer(object _in_layer, object _in_symbology_layer)
        {
            this._in_layer = _in_layer;
            this._in_symbology_layer = _in_symbology_layer;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Apply Symbology From Layer";

        public override string CallName => "management.ApplySymbologyFromLayer";

        public override List<string> AcceptEnvironments => ["autoCommit", "workspace"];

        public override object[] ParameterInfo => [_in_layer, _in_symbology_layer, _symbology_fields, _out_layer, _update_symbology.GetGPValue()];

        /// <summary>
        /// <para>Input Layer</para>
        /// <para>The layer to which the symbology will be applied.</para>
        /// <para>将应用符号系统的图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_layer { get; set; }


        /// <summary>
        /// <para>Symbology Layer</para>
        /// <para>The symbology of this layer will be applied to the input layer. Both .lyrx and .lyr files are supported.</para>
        /// <para>此图层的符号系统将应用于输入图层。支持 .lyrx 和 .lyr 文件。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Symbology Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_symbology_layer { get; set; }


        /// <summary>
        /// <para>Symbology Fields</para>
        /// <para><xdoc>
        ///   <para>The fields from the input layer that match the symbology fields used in the symbology layer. Symbology fields contain three properties:
        ///   <bulletList>
        ///     <bullet_item>Field type—Specifies the field type: symbology value, normalization, or other type.  </bullet_item><para/>
        ///     <bullet_item>Source field—The symbology field used by the symbology layer. Use a blank value or "#" if you do not know the source field and want to use the default.  </bullet_item><para/>
        ///     <bullet_item>Target field—The field from the input layer to use when applying the symbology.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>Supported field types are as follows:
        ///   <bulletList>
        ///     <bullet_item>Value field—Primary field used to symbolize values  </bullet_item><para/>
        ///     <bullet_item>Normalization field—Field used to normalize quantitative values  </bullet_item><para/>
        ///     <bullet_item>Exclusion clause field—Field used for the symbology exclusion clause  </bullet_item><para/>
        ///     <bullet_item>Chart renderer pie size field—Field used to set the size of pie chart symbols  </bullet_item><para/>
        ///     <bullet_item>Rotation X expression field—Field used to set the rotation of symbols on the x-axis  </bullet_item><para/>
        ///     <bullet_item>Rotation Y expression field—Field used to set the rotation of symbols on the y-axis  </bullet_item><para/>
        ///     <bullet_item>Rotation Z expression field—Field used to set the rotation of symbols on the z-axis  </bullet_item><para/>
        ///     <bullet_item>Transparency expression field—Field used to set the transparency of symbols  </bullet_item><para/>
        ///     <bullet_item>Transparency normalization field—Field used to normalize transparency values  </bullet_item><para/>
        ///     <bullet_item>Size expression field—Field used to set the size or width of symbols  </bullet_item><para/>
        ///     <bullet_item>Color expression field—Field used to set the color of symbols  </bullet_item><para/>
        ///     <bullet_item>Primitive override expression field—Field used to set various properties on individual symbol layers  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>输入图层中与符号系统图层中使用的符号系统字段匹配的字段。符号系统字段包含三个属性：
        ///   <bulletList>
        ///     <bullet_item>字段类型 - 指定字段类型：符号系统值、规范化或其他类型。</bullet_item><para/>
        ///     <bullet_item>源字段 - 符号系统图层使用的符号系统字段。使用空白值或“#”，如果您不知道源字段并希望使用默认值。 </bullet_item><para/>
        ///     <bullet_item>目标字段 - 应用符号系统时要使用的输入图层中的字段。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// <para>支持的字段类型如下：
        ///   <bulletList>
        ///     <bullet_item>值字段 - 用于符号化值的主字段</bullet_item><para/>
        ///     <bullet_item>归一化字段 - 用于归一化定量值的字段</bullet_item><para/>
        ///     <bullet_item>排除子句字段 - 用于符号系统排除子句的字段</bullet_item><para/>
        ///     <bullet_item>图表渲染器饼图大小字段 - 用于设置饼图符号大小的字段</bullet_item><para/>
        ///     <bullet_item>旋转 X 表达式字段 - 用于设置 x 轴上符号旋转的字段</bullet_item><para/>
        ///     <bullet_item>旋转 Y 表达式字段 - 用于设置符号在 y 轴上的旋转的字段</bullet_item><para/>
        ///     <bullet_item>旋转 Z 表达式字段 - 用于设置符号在 z 轴上的旋转的字段</bullet_item><para/>
        ///     <bullet_item>透明度表达式字段 - 用于设置符号透明度的字段</bullet_item><para/>
        ///     <bullet_item>透明度规范化字段 - 用于规范化透明度值的字段</bullet_item><para/>
        ///     <bullet_item>大小表达式字段 - 用于设置符号大小或宽度的字段</bullet_item><para/>
        ///     <bullet_item>颜色表达式字段 - 用于设置符号颜色的字段</bullet_item><para/>
        ///     <bullet_item>基元覆盖表达式字段 - 用于在单个符号图层上设置各种属性的字段</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Symbology Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _symbology_fields { get; set; } = null;


        /// <summary>
        /// <para>Updated Input Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_layer { get; set; }


        /// <summary>
        /// <para>Update Symbology Ranges by Data</para>
        /// <para><xdoc>
        ///   <para>Specifies whether symbology ranges will be updated.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—Symbology ranges will be updated, except in the following situations: when the input layer is empty; when the symbology layer uses class breaks (for example, graduated colors or graduated symbols) and the classification method is manual or defined interval; or when the symbology layer uses unique values and the Show all other values option is checked.</bullet_item><para/>
        ///     <bullet_item>Update ranges—Symbology ranges will be updated.</bullet_item><para/>
        ///     <bullet_item>Maintain ranges—Symbology ranges will not be updated; they will be maintained.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否更新符号系统范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认 - 符号系统范围将更新，但以下情况除外：输入图层为空时;当符号系统图层使用分类符（例如，分级颜色或分级符号）且分类方法为手动或定义间隔时;或者当符号系统图层使用唯一值并选中显示所有其他值选项时。</bullet_item><para/>
        ///     <bullet_item>更新范围—符号系统范围将更新。</bullet_item><para/>
        ///     <bullet_item>维护范围—符号系统范围将不会更新;它们将被维护。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Symbology Ranges by Data")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _update_symbology_value _update_symbology { get; set; } = _update_symbology_value._DEFAULT;

        public enum _update_symbology_value
        {
            /// <summary>
            /// <para>Default</para>
            /// <para>Default—Symbology ranges will be updated, except in the following situations: when the input layer is empty; when the symbology layer uses class breaks (for example, graduated colors or graduated symbols) and the classification method is manual or defined interval; or when the symbology layer uses unique values and the Show all other values option is checked.</para>
            /// <para>默认 - 符号系统范围将更新，但以下情况除外：输入图层为空时;当符号系统图层使用分类符（例如，分级颜色或分级符号）且分类方法为手动或定义间隔时;或者当符号系统图层使用唯一值并选中显示所有其他值选项时。</para>
            /// </summary>
            [Description("Default")]
            [GPEnumValue("DEFAULT")]
            _DEFAULT,

            /// <summary>
            /// <para>Update ranges</para>
            /// <para>Update ranges—Symbology ranges will be updated.</para>
            /// <para>更新范围—符号系统范围将更新。</para>
            /// </summary>
            [Description("Update ranges")]
            [GPEnumValue("UPDATE")]
            _UPDATE,

            /// <summary>
            /// <para>Maintain ranges</para>
            /// <para>Maintain ranges—Symbology ranges will not be updated; they will be maintained.</para>
            /// <para>维护范围—符号系统范围将不会更新;它们将被维护。</para>
            /// </summary>
            [Description("Maintain ranges")]
            [GPEnumValue("MAINTAIN")]
            _MAINTAIN,

        }

        public ApplySymbologyFromLayer SetEnv(int? autoCommit = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, workspace: workspace);
            return this;
        }

    }

}